package com.pxmeta.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pxmeta.user.entity.User;
import com.pxmeta.user.entity.UserFollow;
import com.pxmeta.user.entity.dto.UserDTO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wcl
 * @since 2022-07-07
 */
public interface IUserFollowService extends IService<UserFollow> {

    void followUser(Long userId, Long followUserId, Long circleId);


    /**
     * 查询是否关注
     * @param userId
     * @param followUserId
     * @return
     */
    boolean isFollow(Long userId, Long followUserId);

    /**
     * 取消关注
     * @param userId
     * @param followUserId
     */
    void unFollowUser(Long userId, Long followUserId);

    /**
     * 获取关注用户列表
     * @param userId
     * @return
     */
    List<UserDTO> getFollowUsers(Long userId, Integer page, Integer size);

    /**
     * 获取粉丝列表
     * @param userId
     * @return
     */
    List<UserDTO> getFansUsers(Long userId, Integer page, Integer size);


    /**
     * 获取好友列表
     * @param userId
     * @return
     */
    List<UserDTO> getFriendUsers(Long userId, Integer page, Integer size, String keyword, Long circleId, List<String> usernameList);


    /**
     * 获取关注数
     * @param userId
     * @return
     */
    Long getFollowCount(Long userId);


    /**
     * 获取粉丝数
     * @param userId
     * @return
     */
    Long getFansCount(Long userId);

    /**
     * 获取群聊邀请人列表
     * @param userId
     * @param page
     * @param size
     * @param keyword
     * @param chatGroupId
     * @return
     */
    List<UserDTO> getChatGroupInviters(Long userId, Integer page, Integer size, String keyword,  Long chatGroupId);
}
